#include <stdio.h>
#include <math.h>
int main() {
	double  x1, x2, f1, f2, x, f;
	x1 = 1, x2 = 3;
	while (fabs (x1 - x2) >= 0.000001) {
		f1 = x1 * x1 * x1 - x1 * x1 - 1;
		f2 = x2 * x2 * x2 - x2 * x2 - 1;
		x = (x1 + x2) / 2;
		f = x * x * x - x * x - 1;
		if (f * f1 < 0)
			x2 = x1, x1 = x;
		else
			x1 = x;
	}
	printf ("root=%f", x);
}
